<?php
/*========================================= JooSam =========================================/
/																							/
/	Extention:		JooSam																	/
/	Created by:		ScriptPlanet.eu															/
/	Site:			http://www.scriptplanet.eu												/
/	Email:			support@scriptplanet.eu													/
/	Support:		http://www.scriptplanet.eu/support										/
/	Copyright:		2011 (c) ScriptPlanet.eu												/
/	License:		CC BY-NC-ND 3.0 ~ http://creativecommons.org/licenses/by-nc-nd/3.0/		/
/	File Version:	0002																	/
/																							/
/========================================== JooSam ========================================*/
// Joomla Security
defined('_JEXEC') or die;
JHTML::_('behavior.mootools');
jimport('joomla.application.component.helper');
if(JComponentHelper::isEnabled('com_joosam', true)):
	$jsmQueue_color_lbl = $params->get('queue_lblColor', '#000000');
	$jsmQueue_color_data = $params->get('queue_dataColor', '#000000');
	$jsmQueue_background0 = $params->get('queue_bgRow0', '#FFFFFF');
	$jsmQueue_background0hv = $params->get('queue_bgRow0_hv', '#FFFFFF');
	$jsmQueue_background1 = $params->get('queue_bgRow1', '#FFFFFF');
	$jsmQueue_background1hv = $params->get('queue_bgRow1_hv', '#FFFFFF');
	$jsmQueue_maxSongs = $params->get('queue_maxSongs', 5);

	if($jsmQueue_background0 == '#FFFFFF'){ $jsmQueue_background0 = 'none'; }
	if($jsmQueue_background0hv == '#FFFFFF'){ $jsmQueue_background0hv = 'none'; }
	if($jsmQueue_background1 == '#FFFFFF'){ $jsmQueue_background1 = 'none'; }
	if($jsmQueue_background1hv == '#FFFFFF'){ $jsmQueue_background1hv = 'none'; }
	?>
	<style type="text/css">
		.jsm_mod_queue{
			padding-left:2px !important;
		}
		.jsm_mod_queue .jsm_song_bg0{
			width:98%;
			background: <?php echo $jsmQueue_background0; ?>;
		}
		.jsm_mod_queue .jsm_nummerquew{
			width: 30px;
			font-size:110%;
		}
		.jsm_mod_queue .jsm_song_bg0:hover{
			background: <?php echo $jsmQueue_background0hv; ?>;
		}
		.jsm_mod_queue .jsm_song_bg1{
			width:98%;
			background: <?php echo $jsmQueue_background1; ?>;
		}
		.jsm_mod_queue .jsm_song_bg1:hover{
			background: <?php echo $jsmQueue_background1hv; ?>;
		}
		.jsm_mod_queue .jsm_hisArtistLabel{
			color: #<?php echo $jsmQueue_color_lbl; ?>;
			text-align:left;
			width:50px;
		}
		.jsm_mod_queue .jsm_hisArtistData{
			color: #<?php echo $jsmQueue_color_data; ?>;
			text-align:left;
		}
	</style>
	<div id="jsm_queue" class="jsm_mod_queue"></div><?php
	$joosam_plugin = JPluginHelper::isEnabled('system', 'joosam');
	$jsm_artist = JText::_('MOD_JOOSAM_QUEUE_ARTIST');
	$jsm_title = JText::_('MOD_JOOSAM_QUEUE_TITLE');
	if($joosam_plugin): ?>
		<script>
			var timer = 5000;
			var jsmQueue_maxSongs = <?php echo $jsmQueue_maxSongs; ?>;
			setTimeout('joosam.ajax_queue("jsm_queue", '+timer+', "<?php echo $jsm_artist; ?>:", "<?php echo $jsm_title; ?>:", jsmQueue_maxSongs)', 3000);
		</script> <?php
	else: ?>
		<div id="jsm_queue">
			<div style="background:white; color:red; font-weight:bold; border-radius:10px; margin:1px; text-align:center; padding:0;">
				<?php echo JText::_('MOD_JOOSAM_QUEUE_NOPLUGIN'); ?>
			</div>
		</div><?php
	endif;
else: ?>
	<div id="jsm_queue">
		<div style="background:white; color:red; font-weight:bold; border-radius:10px; margin:1px; text-align:center; padding:0;">
			<?php echo JText::_('MOD_JOOSAM_QUEUE_NOCOMPONENT'); ?>
		</div>
	</div><?php
endif;
?>